home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- ─────────── DayQuote ───────────
-
- (c) 1994, 1995 Freeware Unlimited
-
- ──────────────────────────────────
-
-
-
-
-
-
-
- Contents
- ──────────────────────────────────────────
-
- ■ Introduction . . . . . . . . . . . . . 2
-
- ■ Quote File Structure . . . . . . . . . 3
-
- ■ Command Line Options . . . . . . . . . 5
-
- ■ Result Messages . . . . . . . . . . . 8
-
- ──────────────────────────────────────────
-
-
-
-
-
-
-
-
-
-
-
- ╔═════════════════════════════════════════════════╗
- ║ He's dead, Jim. ║
- ║ - Bones ║
- ╚═════════════════════════════════════════════════╝
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 1
- ────────────────────────────────────────────────────────────────────────────
- ■ INTRODUCTION
- ────────────────────────────────────────────────────────────────────────────
-
-
- ■ What DayQuote Is:
-
- It is, to be perfectly honest, the first real program I have
- written, and there might exist on some plane programmers who are
- self-important enough to say that even this isn't a real program.
-
- Nevertheless, I think you will enjoy it, and its many options.
- Those hypothetical programmers I mentioned earlier might even
- take a second glance at its versatile command line options.
-
- All of those options are described below, in their totality.
- The text is concise; hence, it might be 'thick' in some places.
- Please, though, if you feel justified in your critique of my
- writing - either in the English language or the BASIC language -
- then I would welcome your comments by snail mail.
-
-
- ■ How It Works:
-
- It takes what you have typed in following its name on the command
- line and then acts on the information you have given to it.
- Several things can take place from there, depending upon what
- you gave to it in the form of 'switches' on the command line.
-
- If it encounters '/?' anywhere, it will show the Help Screen,
- then return you to the command line. If it encounters the '/D'
- switch, it will go into an exclusive process similar to the '/?'
- switch, except that it is more comprehensive in every respect.
- See the section about Command Line Options for complete details
- on these options, as well as the following ones.
-
- Aside from those switches, there are nine other switches that
- you can use to fully customize the look of your quotes. Two of
- those will control the color of the text frame displayed, and two
- others will determine how wide the frame will be. One of them
- also allows you to place the frame starting at any line on your
- screen, and there is another switch that will clear the screen
- before doing so. Finally, there are three switches to choose
- from that will control how the text of the quote is justified
- within the frame; left- or right- or centered.
-
-
- ■ To Get More Information:
-
- Type 'DAYQUOTE/$' on the command line and read about how you can
- get free money sent to you, and a whole bunch of other free stuff.
-
-
-
-
-
-
-
-
-
-
- Page 2
- ────────────────────────────────────────────────────────────────────────────
- ■ QUOTE FILE STRUCTURE
- ────────────────────────────────────────────────────────────────────────────
-
- ■ Quote file basics:
-
- What follows between the funky lines is a representative sample
- of a valid quote file.
-
- /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
- | Four score and seven years ago... |
- | ~~Abraham Lincoln |
- | |
- | He's dead, Jim. |
- | ~~Bones |
- | |
- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
-
- The basic philosophy behind it is to try grouping each body of
- text as close as possible. Each distinct quote must be separated
- by a minimum of two carriage returns (Enters), including the one
- at the end of the previous quote's line. The picture again:
-
- /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
- | Four score and seven years ago... |
- | ~~Abraham Lincoln «» <──────────── carriage return 1 |
- | «» <────────────────────────────── carriage return 2 |
- | He's dead, Jim. |
- | ~~Bones |
- | |
- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
-
- If you slip up, though, and have, say, 42 carriage returns in there
- by pure accident, don't sweat it. The program is fairly lax in
- searching for quotes, aside from the one hard rule listed above.
-
- It will ignore multiple spaces, as well as single carriage returns.
- The text which is separated by at least two carriage returns is
- considered the body of one quote, and will become one string of
- text, each word separated by one space, that will be displayed
- in accordance with any specified parameters, no matter how many
- spaces are embedded within the quote. You could have 113 spaces
- between just two words, and the quote will display as two words
- separated by a single space. The rationale for this flexibility
- is that sometimes we don't realize there are a whole bunch of
- extra spaces at the end of a line, because we can't really SEE
- them, so it just makes the program more forgiving of our own
- imperfections.
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 3
- ■ Creating your own quote file:
-
- The best way to make a quote file is to use a 'text editor' or
- a 'word processor'. If you use a word processor, make sure when
- you save the file that you are saving it in 'pure ASCII', which
- will mean unformatted text only, otherwise, you are apt to have
- some very strange-looking quotes appearing on your screen, since
- the word processor formatting codes that get added to the text
- will probably not comply very much with the two-return rule.
-
- It is best to just type the text in as you want it to read. Again,
- how the text looks in the file will be irrelevant to how it is
- displayed. All display aspects are controlled by the optional
- command line switches, and all of those switches have defaults,
- so you need not worry about the display aspects until later on,
- when you are more familiar with the program's operation.
-
- One worthy note here is that all quotes will be displayed in a
- bordered rectangle, therefore it is not necessary to include
- quotation characters in your quote file, unless you prefer the
- look of them. (Future releases will allow custom frame borders.)
-
- This documentation file was created originally by me using the
- MS-DOS Editor, an easy-to use, standard ASCII text editor, and
- it looked exactly as you see it now. If you wanted to, you could
- try using this documentation file as your test quote file. Each
- paragraph, since they are all separated by two carriage returns,
- would be considered a single quote. If you do this, though, be
- advised that you might get the 'Attempt to read a binary file...'
- message, due to the form-feed characters embedded in the text.
- See the Result Messages section for more details on errors.
-
-
- ■ 'Attributed' quotes:
-
- Back to the drawing board:
-
- /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
- Quote ──────────────> | Four score and seven years ago... |
- 'Attribution' ───────> | ~~Abraham Lincoln |
- | |
- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
-
- As you can see, an attribution is the name of the person to whom
- the quote is attributed. When DayQuote encounters the attribution
- code, '~~', it stops reading the quote, and makes whatever
- follows into the attribution. Upon display, the attribution will
- appear to the right side of the quote frame, preceded by a dash
- and a single space, like this:
-
- ╔═══════════════════════════════════════════════════╗
- ║ Four score and seven years ago... ║
- ║ - Abraham Lincoln ║
- ╚═══════════════════════════════════════════════════╝
-
- If what follows the attribution code is too long to fit in the
- frame, then the remaining text will be truncated. This shouldn't
- be a problem, though, if the attribution is just a name.
-
-
-
- Page 4
- ─────────────────────────────────────────────────────────────────────────────
- ■ COMMAND LINE OPTIONS
- ────────────────────────────────────────────────────────────────────────────
-
- ┌──────────────────────────────────────────────────────────────┐
- │ DayQuote 1.0 ─ Copyright 1994, 1995 by Freeware Unlimited. │
- ├──────────────────────────────────────────────────────────────┤
- │ Usage: DAYQUOTE [switches] quotefil.ext │
- │ │
- │ Switches: │
- │ /? - Shows this help screen. │
- │ /F:c - Use foreground color 'c', as listed below. │
- │ /B:c - Use background color 'c', as listed below. │
- │ /L - Left-justify the text. │
- │ /R - Right-justify the text. │
- │ /C - Center the text. │
- │ /S:# - Start at specified column # (1-30). Default = 10 │
- │ /E:# - End at specified column # (50-80). Default = 70 │
- │ /T:# - Top line # to begin on (1-24). Default = current │
- │ /W - Wipe (clear) the screen before displaying. │
- │ /D[:n] - Create documentation file, DAYQUOTE.DOC, or 'n'. │
- │ /$ - Get money sent to you. │
- │ │
- │ Available foreground colors and background colors are: │
- │ │
- │ BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, WHITE, GRAY │
- │ LTBLUE, LTGREEN, LTCYAN, LTRED, LTMAGENTA, YELLOW, BRWHITE │
- └──────────────────────────────────────────────────────────────┘
-
-
-
- ────────────────────────────────────────────────────────────────────────────
- ■ EXTENDED OPTION DESCRIPTIONS
- ────────────────────────────────────────────────────────────────────────────
-
- ■ Color switches:
-
- /F:color - Sets foreground color. Default color is white.
- /B:color - Sets background color. Default color is black.
-
- Use these switches to specify foreground and background colors
- to use when displaying a quote. 'Color' represents one of the
- following colors or abbreviations:
-
- ┌───────────────────────────────────────────────────┐
- │ color = abbr. color = abbr. │
- ├───────────────────────────────────────────────────┤
- │ BLACK = BLK GRAY or GREY = GRY │
- │ BLUE = BLU LTBLUE = LBL │
- │ GREEN = GRN LTGREEN = LGR │
- │ CYAN = CYA LTCYAN = LCY │
- │ RED = RED LTRED = LRD │
- │ MAGENTA = MAG LTMAGENTA = LMG │
- │ BROWN = BRN YELLOW = YEL │
- │ WHITE = WHT BRWHITE = BRW │
- └───────────────────────────────────────────────────┘
-
-
-
-
-
- Page 5
- ■ Text justification switches:
-
- /L - Sets displayed text as left-justified. This is the default.
- /R - Sets displayed text as right-justified
- /C - Sets displayed text as centered.
-
- Use one of these switches to have the quote text display in a way
- that you prefer. One note on this switch: an 'attributed' quote
- (see the section about Quote File Structure) will always have
- it's attribution displayed on the last line, right-justified.
- The text body of the quote, however, will display as you set it.
-
-
- ■ Starting column switch:
-
- /S:# - Sets the starting column as the number specified.
-
- Use this switch, along with the /E switch, to customize the
- displayed quote to suit your tastes. Valid values for this
- switch range from 1 to 30, inclusive.
-
- The default starting column is column 10.
-
-
- ■ Ending column switch:
-
- /E:# - Sets the ending column as the number specified.
-
- Use this switch, along with the /S switch, to customize the
- displayed quote to suit your tastes. Valid values for this
- switch range from 50 to 80, inclusive.
-
- The default ending column is column 70.
-
-
- ■ Top line switch:
-
- /T:# - Sets the top line as the line number specified.
-
- Use this switch to further customize the look of the displayed
- quote to suit your tastes. Valid values for this switch range
- from 1 to 24, inclusive.
-
- The default top line is the line number before execution, plus 2.
-
-
- ■ Clear screen switch:
-
- /W - Wipes (clears) the screen before displaying a quote.
-
- Use this switch, along with the /T switch, to further enhance
- the visual quality of the displayed quote.
-
-
-
-
-
-
-
-
-
- Page 6
- ■ Create Documentation switch:
-
- /D[:n] - Creates this documentation file.
-
- Use this switch to create this documentation file at any time.
- You may also specify the name of the file by following the switch
- with a colon and then the name you want to give the file, otherwise
- the file created will be named, DAYQUOTE.DOC.
-
- This switch can also be used to create printed documentation by
- specifying a printer device as the file name, such as PRN or LPT1,
- or it can be used to quickly browse the documentation by using
- the 'CON' device, pressing the 'Pause' key to pause the scrolling.
-
- To accomplish the latter, enter: DAYQUOTE /D:CON
-
-
- ■ Beg switch:
-
- /$ - Begs you for money.
-
- Use this switch to get the address of Freeware Unlimited from
- the command line so you can send me large amounts of cash, if
- you feel generous.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 7
- ────────────────────────────────────────────────────────────────────────────
- ■ RESULT MESSAGES
- ────────────────────────────────────────────────────────────────────────────
-
- ■ Command-line errors:
-
- » Quote file not specified.
-
- You have not specified a file name to look for quotes in.
- This is the only required parameter for the program to be
- able to correctly display a quote.
-
- This message, as well as with any other command line errors,
- will be followed by the message: Type 'DAYQUOTE /?' for help.
-
-
- » Quote file can not be a reserved device name
-
- You have specified a quote file with the name of a reserved
- device.
-
- Reserved devices are CON, AUX, PRN, CLOCK$, COM1, COM2, COM3,
- COM4, LPT1, LPT2, and LPT3.
-
- This result message will also show the device you specified.
-
-
- » Invalid switch
-
- You have entered an invalid switch on the command line. Any
- text on the command line that is preceded by the forward
- slash character (/), up to but not including the next slash
- character or the next whitespace character, is considered
- to be a switch.
-
- This result message will also show the incorrect switch used.
-
-
- » Missing colon in switch
-
- You have specified a switch which requires a second parameter
- in the form of (switch):(parameter), but you left out the
- colon character immediately following the switch.
-
- This result message will also show the incorrect switch used.
-
-
- » Invalid foreground specification
-
- » Invalid background specification
-
- You have specified an invalid display color. See the section
- containing Extended Option Descriptions for the complete list
- of available colors and their abbreviations.
-
- These result messages will also show the color you specified.
-
- If not specified, the foreground color will be white, and the
- background color will be black.
-
-
- Page 8
- » Multiple text justifications are not allowed
-
- You have included too many text justification switches on the
- command line. Only one of the switches, /L /R or /C, may be
- used at a time.
-
- Using two or more on the command line generates an error to
- avoid having the program ignore subsequent justification
- switches after reading the first one - a technique which
- can only lead to further confusion.
-
- Text will be left-justified if one of these switches is not used.
-
-
- » Invalid starting column
-
- You have specified an invalid starting column at which to
- begin displaying each line of the quote. Valid values for
- this switch are in the range of 1 to 30, inclusive.
-
- This result message will also show the column you specified.
-
- The starting column will be 10 if this switch is not used.
-
-
- » Invalid ending column
-
- You have specified an invalid ending column at which to stop
- displaying each line of the quote. Valid values for this
- switch are in the range of 50 to 80, inclusive.
-
- This result message will also show the column you specified.
-
- The ending column will be 70 if this switch is not used.
-
-
- » Invalid top line
-
- You have specified an invalid top line at which to begin
- displaying the quote. Valid values for this switch are in
- the range of 1 to 24, inclusive.
-
- This result message will also show the line you specified.
-
- The top line will be the line number before execution,
- plus 2, if this switch is not used.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 9
- ■ File errors:
-
- » Bad file name: (filename)
-
- You specified an invalid file name as the quote file.
-
-
- » Drive not ready looking for quote file: (filename)
-
- You attempted to read a quote file on a drive that either had
- no disk present, or which had it's door open.
-
-
- » Unsupported disk format encountered looking for file: (filename)
-
- The disk you are attempting to read from is of an unrecognized
- format, or may be unformatted altogether.
-
-
- » Path not found looking for quote file: (filename)
-
- You specified a path or a file name which could not be found.
-
-
- » Problem looking for quote file: (filename)
-
- The file name you specified does not exist.
-
-
- » Attempt to read an empty file: (filename)
-
- You specified a file which was only a file name, containing no
- information. Type 'DIR (filename)' on the command line to
- verify that the file is of zero length.
-
-
- » Attempt to read a binary file or non-text characters found in:
- (filename)
-
- You specified a file that contains characters not found in
- text files. The file is a binary file, or other non-ASCII
- file, or it contains undisplayable control characters, such
- as vertical tabs or form feeds.
-
- This error will also report detailed information on the invalid
- characters found, as well as their location in the file. The
- 'reference block', as it will be called, will show the text
- block which starts about 100 bytes before the encountered
- binary character and which ends about 100 characters afterward.
-
-
- » No quotes found in file: (filename)
-
- The file name which was specified contains no text.
-
-
-
-
-
-
-
- Page 10
- » File read error - Size of object in: (filename)
- (filename) is possibly not a quote file.
-
- The specified quote file contains a block of text that is larger
- than the limit of 1670 characters. This message might be the
- result of specifying a binary file or other non-quote text file.
-
-
- » Overflow reading file: (filename)
- (filename) is too large.
-
- You have likely specified a binary file or other non-quote file.
-
-
- ■ Documentation printing messages:
-
- » Printing documentation to file: (filename)
-
- This message will display, followed by visibly incrementing dots,
- until the documentation file is finished being created.
-
-
- » Bad file name: (filename)
-
- You specified an invalid file name as the output file.
-
-
- » Drive not ready printing to file: (filename)
-
- The drive you attempted to print the file to was a drive which
- had no disk present, or which had it's door open.
-
-
- » Unsupported disk format encountered printing to file: (filename)
-
- The disk you are attempting to print to is of an unrecognized
- format, or may be unformatted altogether. The disk has no
- file structures present within which to store the file.
-
-
- » Path not found printing to file: (filename)
-
- You specified a path which could not be found in which to create
- the requested file.
-
-
- » Printer is not responding at attempt to print file.
-
- » (devicename) is not responding at attempt to print file.
-
- » Device fault error printing to file: (devicename)
-
- You have used a device name which is not responding to the
- data being transmitted. If 'PRN', then check to see that
- it is online, and that it is connected properly.
-
-
-
-
-
-
- Page 11
- ■ Miscellaneous messages:
-
- » Quote text is too long to fit in the specified frame.
-
- The text of the quote, after formatting it for the screen, will
- exceed the screen height boundary, hence it can not be used.
-
- You can try adjusting the starting and ending columns if you
- get this message, but since the choice of quote from the file
- is a random choice, there is no guarantee that the program
- will attempt to display the same quote. If you have very long
- quotes in your quote file, you should probably not specify
- starting and ending columns with the /S: and /E: switches unless
- you use them make the region width wider than the default of
- 61 columns.
-
- You can also try narrowing down the maximum quote width by
- creating a file containing only the longest quote, then, using
- that file as the quote file, trying different starting and ending
- columns until you no longer get this result message.
-
-
- » System error number #(nn) handling quote file: (filename)
- - (relevant error message) -
-
- » System error number #(nn) printing to file: (filename)
- - (relevant error message) -
-
- » System error number #(nn) displaying quote from file: (filename)
- - (relevant error message) -
-
- An unforeseen error has occurred in the specified routine. The
- number, 'nn' is the equivalent BASIC error number, and the
- message is the known cause of it.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 12